var test_a = 12;
var test_b = -2;

console.log(abc(test_b));
// console.log(_abc(test_b)); //在这里会报错

function abc(x) {
    if (x >= 0) {
        return x;
    } else {
        return -x;
    }
}

var _abc = function (x) {
    if (x >= 0) {
        return x;
    } else {
        return -x;
    }
}

var x, y;
({
    x,
    y
} = {
    name: '小明',
    x: 100,
    y: 100
})

console.log(_abc(test_b));